home *** CD-ROM | disk | FTP | other *** search
- The following program, when placed in the AUTO folder or started by hand,
- lets you interrupt any program (except the desktop).
- The corresponding binary is sent to the moderator of comp.binaries.atari.st.
- The program was assembled and linked with the assembler and linker from the
- GST-C compiler.
-
- For correspondence conceirning this program (bugs, questions etc.) try
-
- L. J. M. de Wit
- Nachtegaallaan 7
- 5731XP Mierlo
- Holland
- e-mail: ..!mcvax!philmds!leo
- (or perhaps ..!hp4nl!philmds!leo)
-
- The following program, when placed in the AUTO folder or started by hand,
- lets you interrupt any program (except the desktop).
- This posting consists of a manual page and a uuencoded program.
- The corresponding source is sent to the moderator of comp.sources.atari.st.
-
- For correspondence conceirning this program (bugs, questions etc.) try
-
- L. J. M. de Wit
- Nachtegaallaan 7
- 5731XP Mierlo
- Holland
- e-mail: ..!mcvax!philmds!leo
- (or perhaps ..!hp4nl!philmds!leo)
-
- ----------------------------- start of manual page ----------------------------
- NAME
- break - stop current program on receipt of interrupt character
-
- SYNTAX
- break [-e|-d|-z] [-i|-c<code>]
-
- DESCRIPTION
- After installing break, any program can be interrupted.
- This is achieved by 'extending' the existing keyboard interrupt
- routine: after executing the old code the break character check
- is done.
-
- The various flags have the following meaning:
- e(nable) : the current break character will end the program.
- the code returned is -32, what seems to be the standard
- value for programs interrupted by ^C in GEMDOS.
- d(isable): no actions are done; this restores the old behaviour
- z(ero) : the current break character will be discarded (made 0)
- in the input buffer; this can be used to disable ^C.
- i(nput) : the break character is prompted for. Combinations with
- shift, control and alternate keys are also allowed.
- Useful for specifying the break character interactively.
- c(ode) : specifies the break character as a hexadecimal code.
- The hex code must follow the 'c' flag immediately.
- Useful for specifying the break character from a script.
- Of the flags e,d and z only one should be used; e is the default.
- Also, of the flags i and c only one should be used; control-delete is
- the default. This is done on purpose; you can always change it to ^C
- if you want to (or whatever key you like).
-
- The break program can be reused indefinitely, because a next invocation
- is not made memory resident; it only modifies parameters in the first
- invocation (the resident one).
-
- The program can be placed into the \AUTO folder to be installed
- automatically, or activated 'by hand'. If placed in the \AUTO folder, it
- should of course have a .PRG extension (break.prg); as \AUTO folder
- programs don't get arguments, the break will be enabled and the break
- character is control-delete in this case.
-
- BUGS/SHORTCOMINGS
- A nice extension would be the possibility to catch the interrupt from
- a user program; this could be achieved by using a new trap. As this
- implies restoring the old interrupt catch routine when the program
- exits, and maybe also core dumps could be added to the action of an
- (other) interrupt character, such a more general signal mechanism is
- not added (yet). Gives me time to think of a nice implementation 8-).
-
- JOKE
- Gimme a break, huh?!
-
- [This is a new version of Leo de Wit's "break" program, recently posted.
- It avoids the use of undocumented locations, so should be compatible with
- all versions of TOS. -sg]
-
- Here is the source to your break.s, as modified by me. There is no
- command line option to change the default hard-break key -- I'm just
- lazy, I guess.
-
- Opinions expressed above do not necessarily -- Allan Pratt, Atari Corp.
- reflect those of Atari Corp. or anyone else. ...ames!atari!apratt
-
-
-